import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: HomeView,
    children: [
      {
        path: '/',
        component: () => import('../views/el-main/IndexView.vue')
      },
      {
        path: '/el-main/cake',
        component: () => import('../views/el-main/CakeView.vue')
      },
      {
        path: '/el-main/bread',
        component: () => import('../views/el-main/BreadView.vue')
      },
      {
        path: '/el-main/setMeal',
        component: () => import('../views/el-main/SetMealView.vue')
      },
      {
        path: '/el-main/flowers',
        component: () => import('../views/el-main/FlowersView.vue')
      },
      {
        path: '/el-main/dessert',
        component: () => import('../views/el-main/DessertView.vue')
      },
      {
        path: '/el-main/rim',
        component: () => import('../views/el-main/RimView.vue')
      },
      {
        path: '/el-main/enterpriseZone',
        component: () => import('../views/el-main/EnterpriseZoneView.vue')
      },
      {
        path: '/el-main/BrandStory',
        component: () => import('../views/el-main/BrandStoryView.vue')
      },
      {
        path: '/el-main/cart',
        component: () => import('../views/el-main/CartView.vue')
      },
      {
        path: '/el-main/settlement',
        component: () => import('../views/el-main/SettlementView.vue')
      },
      {
        path: '/el-main/notProductCart',
        component: () => import('../views/el-main/NotProductCartView.vue')
      },
    ]
  },
  {
    path: '',
    component: () => import('../views/el-main/IndexView.vue')
  },
  {
    path: '/login',
    component: () => import('../views/LoginView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
